﻿<%@ Page Language="C#" MasterPageFile="~/Shared/EOS.Master" AutoEventWireup="true"
    CodeBehind="DanhSachDongHoTheoDuong.aspx.cs" Inherits="EOSCRM.Web.Forms.DongHo.BaoCao.DanhSachDongHoTheoDuong" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register TagPrefix="eoscrm" Namespace="EOSCRM.Controls" Assembly="EOSCRM.Controls" %>
<asp:Content ID="head" ContentPlaceHolderID="headCPH" runat="server">

    <script type="text/javascript">
        $(document).ready(function() {
            $("#divDuongPho").dialog({
                autoOpen: false,
                modal: true,
                minHeight: 100,
                height: 'auto',
                width: 'auto',
                resizable: false,
                open: function() {
                    $(this).parent().appendTo("#divDuongPhoDlgContainer");
                }
            });
        });
    </script>

</asp:Content>
<asp:Content ID="content" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div id="divDuongPhoDlgContainer">
        <div id="divDuongPho" style="display: none">
            <asp:UpdatePanel ID="upnlDuongPho" runat="server" UpdateMode="Conditional">
				<ContentTemplate>
				    <table class="crmtable width-500">
                        <tbody>
                            <tr class="crmcontainer">
                                <td class="crmcell right">
                                    Từ khóa
                                </td>
                                <td class="crmcell">
                                    <div class="left">
                                        <eoscrm:TextBox ID="txtFilterDP" PostBackControlID="btnFilterDP" runat="server" Width="250px" MaxLength="200" />
                                    </div>
                                    <div class="left">
                                        <eoscrm:Button ID="btnFilterDP" OnClick="btnFilterDP_Click" runat="server" CssClass="filter" />
                                    </div>
                                </td>
                            </tr>
                            <tr>
				                <td class="crmcell ptop-10" colspan="2">
				                    <div class="crmcontainer">
				                        <eoscrm:Grid ID="gvDuongPho" runat="server" OnRowCommand="gvDuongPho_RowCommand" UseCustomPager="true">
                                            <PagerSettings FirstPageText="đường phố" PageButtonCount="2" />
                                            <Columns>
                                                <asp:TemplateField HeaderStyle-Width="40px" HeaderText="Mã ĐP">
                                                    <ItemTemplate>
                                                        <eoscrm:LinkButton ID="lnkBtnID" runat="server" 
                                                            CommandArgument='<%# Eval("MADP") %>' 
                                                            CommandName="SelectMADP" 
                                                            Text='<%# Eval("MADP") %>'></eoscrm:LinkButton>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="TENDP" HeaderText="Tên đường phố" />
                                                <asp:TemplateField HeaderStyle-Width="100px" HeaderText="Khu vực">
                                                    <ItemTemplate>
                                                        <%# Eval("KHUVUC.TENKV") %>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </eoscrm:Grid>
                                    </div>
				                </td>
			                </tr>
                        </tbody>
                    </table>
				</ContentTemplate>
	        </asp:UpdatePanel>
        </div>
    </div>
    <asp:UpdatePanel ID="upnlBaoCao" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer">
                <table class="crmtable">
                    <tbody>
                        <tr>
                            <td class="crmcell right">Từ ngày</td>
                            <td class="crmcell">
                                <div class="left">
                                    <asp:TextBox ID="txtTuNgay" tag="datevn" runat="server" Width="75px" />
                                </div>
                                <div class="left">
                                    <div class="right">Đến ngày</div>
                                </div>
                                <div class="left">
                                    <asp:TextBox ID="txtDenNgay" tag="datevn" runat="server" Width="75px" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Đường
                            </td>
                            <td class="crmcell">
                                <div class="left">
                                    <eoscrm:TextBox ID="txtMADP" PostBackControlId="btnReport" runat="server" Width="35px" />&nbsp;
                                </div>
                                <div class="left">
                                    <eoscrm:Button ID="btnBrowseDP" runat="server" CssClass="pickup" OnClick="btnBrowseDP_Click"
                                        DialogType="MODALDIALOG" DialogTitle="Chọn từ danh sách đường phố"
                                        DialogWidth="500" DialogDivContainer="divDuongPho" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Người lập
                            </td>
                            <td class="crmcell">
                                <div class="left">
                                    <asp:TextBox ID="txtNguoiLap" runat="server" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                            </td>
                            <td class="crmcell">
                                <div class="left">
                                    <eoscrm:Button ID="btnReport" runat="server" OnClick="btnBaoCao_Click" CssClass="report" />
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <asp:UpdatePanel ID="upnlReport" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer" id="divreport" runat="server" visible="False">
                <CR:CrystalReportViewer ID="rpViewer" runat="server" PrintMode="ActiveX" AutoDataBind="true"
                    DisplayGroupTree="False" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
